<script>
export default {
  name: "IndexVue"
}
</script>

<template>
  <el-container style="height: 100vh; background-color: #f0f2f5;">
    <!-- 顶部导航栏 -->
    <el-header>
      <div style="text-align: center; font-size: 24px; font-weight: bold;">学生后台管理系统</div>
    </el-header>

    <el-container>
      <!-- 侧边栏导航 -->
      <el-aside width="200px">
        <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            background-color="#001529"
            text-color="#b7c3d1"
            active-text-color="#fff"
        >
          <el-menu-item index="1">
            <i class="el-icon-user"></i>
            <router-link to="/student">学生管理</router-link>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-notebook-2"></i>
            <router-link to="/courseManagement">课程管理</router-link>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-reading"></i>
            <router-link to="/teacher">教师管理</router-link>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-document"></i>
            <router-link to="/score">成绩管理</router-link>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <!-- 内容区域 -->
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.el-header {
  background-color: #001529;
  color: #fff;
  line-height: 60px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.el-aside {
  background-color: #001529;
  color: #fff;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.el-main {
  background-color: #f0f2f5;
  color: #333;
  padding: 20px;
}

.el-menu {
  border-right: none;
}

.el-menu-item {
  padding: 0 20px;
  transition: background-color 0.3s ease;
}

.el-menu-item.is-active {
  background-color: #1890ff !important;
  color: #fff !important;
}

.el-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.router-link {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}

.el-menu-item i {
  margin-right: 10px;
}
</style>